package demo7;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Student {
    private String name;

    public String getName() {
        return name;
    }

    @Value("lisi")
    public void setName(String name) {
        System.out.println("2:Student的setName方法被调用了！");
        this.name = name;
    }

    public Student(){
        System.out.println("1:Student的构造器执行了");


    }

}
